import config from "@/config";
import http from "@/utils/request";

export default {
	add: {
		url: `${config.API_URL}/student`,
		name: "学员新增",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	// #region 删除学员
	delete: {
		url: `${config.API_URL}/student/delete`,
		name: "删除学员",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	// #endregion 删除学员
	list: {
		url: `${config.API_URL}/student/page`,
		name: "数据列表",
		get: async function (params) {
			return await http.post(this.url, params);
		},
	},
	// #region 下拉框获取学员列表
	dropdown: {
		url: `${config.API_URL}/student/dropdown`,
		name: "下拉框获取学员列表",
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	selectIntrodStudent: {
		url: `${config.API_URL}/Students/selectIntrodStudent`,
		name: "转介绍学员",
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	selectIntrodEmployee: {
		url: `${config.API_URL}/Members/selectIntrodEmployee`,
		name: "转介绍员工",
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	// #region 学员详情
	// #region 学员详情-报读情况
	signUpList: {
		url: `${config.API_URL}/college/curricula/page`,
		name: "报读列表",
		get: async function (data) {
			return await http.post(this.url, data);
		},
	},
	// #endregion 学员详情-报读情况
	// #region 学员详情-班级管理
	classManagementList: {
		url: `${config.API_URL}/college/grade/page`,
		name: "班级管理列表",
		get: async function (data) {
			return await http.post(this.url, data);
		},
	},
	// #endregion 学员详情-班级管理
	// #region 学员详情-课程表
	courseTableList: {
		url: `${config.API_URL}/college/course/page`,
		name: "课程表列表",
		get: async function (data) {
			return await http.post(this.url, data);
		},
	},
	// #endregion 学员详情-课程表
	// #region 学员详情 - 查看学员详情
	viewStudentDetail: {
		url: `${config.API_URL}/student/getDetail`,
		name: "查看学员详情",
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	// #endregion 学员详情 - 查看学员详情
	// #region 学员详情 - 修改学员详情
	updateStudentDetail: {
		url: `${config.API_URL}/student/update`,
		name: "修改学员详情",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	// #endregion 学员详情 - 修改学员详情
	// #endregion 学员详情

	// -----------------学生毕业管理--------------
	// 分页查询学员课程记录【毕业管理列表】
	graduate: {
		url: `${config.API_URL}/college/graduate/page`,
		name: "查询学员课程记录",
		get: async function (params) {
			return await http.post(this.url, params);
		},
	},
	// 毕业管理详情【学员信息、课程信息】
	findDetail: {
		url: `${config.API_URL}/college/graduate/findDetail`,
		name: "毕业管理详情",
		post: async function (params) {
			return await http.post(this.url, params, {
				headers: {
					"Content-Type": "application/x-www-form-urlencoded",
				},
			});
		},
	},
	// 修改学员毕业表
	graduateUpdate: {
		url: `${config.API_URL}/college/graduate/update`,
		name: "毕业管理详情",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	// 删除学员毕业表
	graduateDelete: {
		url: `${config.API_URL}/college/graduate/delete`,
		name: "删除学员毕业表",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	// 新增学员毕业表
	setGraduate: {
		url: `${config.API_URL}/college/graduate`,
		name: "新增学员毕业表",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	// 分页查询转班表
	transfer: {
		url: `${config.API_URL}/logger/transfer/page`,
		name: "分页查询转班表",
		get: async function (params) {
			return await http.post(this.url, params);
		},
	},
	// 分页查询学员考勤表
	attendance: {
		url: `${config.API_URL}/college/attendance/page`,
		name: "分页查询学员考勤表",
		get: async function (params) {
			return await http.post(this.url, params);
		},
	},
	// 获取考勤详情
	attendanceDetail: {
		url: `${config.API_URL}/college/attendance/findDetail`,
		name: "分页查询学员考勤表",
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	// 分页查询学生操作日志
	studentOprateLog: {
		url: `${config.API_URL}/logger/student-oprate-log/page`,
		name: "分页查询学生操作日志",
		get: async function (params) {
			return await http.post(this.url, params);
		},
	},
	// 分页查询企业人员表
	enterprise: {
		url: `${config.API_URL}/enterprise/enterprise/page`,
		name: "分页查询企业人员表",
		get: async function (params) {
			return await http.post(this.url, params);
		},
	},
	// 分页查询排课表
	courseSchedule: {
		url: `${config.API_URL}/college/course-schedule/findPage`,
		name: "分页查询排课表",
		get: async function (params) {
			return await http.post(this.url, params);
		},
	},
	// 分页查询学生日常上课表
	studentSchedule: {
		url: `${config.API_URL}/student/student-schedule/page`,
		name: "分页查询学生日常上课表",
		get: async function (params) {
			return await http.post(this.url, params);
		},
	},
	// 申请毕业
	applyGraduation: {
		url: `${config.API_URL}/college/graduate/applyGraduation`,
		name: "申请毕业",
		get: async function (params) {
			return await http.post(this.url, params, {
				headers: {
					"content-type": "multipart/form-data",
				},
			});
		},
	},
	// 毕业申请详情界面信息
	findGraduateDetail: {
		url: `${config.API_URL}/college/graduate/findGraduateDetail`,
		name: "毕业申请详情界面信息",
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	// 毕业作品审核
	examine: {
		url: `${config.API_URL}/college/graduate/examine`,
		name: "毕业作品审核",
		get: async function (params) {
			return await http.post(this.url, params);
		},
	},
	// 分页查询老师考勤
	attendanceTeacher: {
		url: `${config.API_URL}/college/attendance-teacher/findPage`,
		name: "分页查询老师考勤",
		get: async function (params) {
			return await http.post(this.url, params);
		},
	},
	// 获取考勤详情
	attendanceFindDetail: {
		url: `${config.API_URL}/college/attendance-teacher/findDetail`,
		name: "获取考勤详情",
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	// 获取老师考勤详情中学员考勤详情
	findDetailStudent: {
		url: `${config.API_URL}/college/attendance-teacher/findDetailStudent`,
		name: "获取老师考勤详情中学员考勤详情",
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
};
